package com.bjpowernode.springboot.service.Impl;

import com.bjpowernode.springboot.entity.User;
import com.bjpowernode.springboot.mapper.UserMapper;
import com.bjpowernode.springboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service // 放置到spring容器中
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper; // 主导dao层的接口实现sql相关的操作

    @Override
    public User queryUserById(int id) {
        return userMapper.queryUserById(id);
    }
}
